package com.example.gymmanagement.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName matchs
 */
@TableName(value ="matchs")
@Data
public class Matchs implements Serializable {
    /**
     * 赛事id
     */
    @TableId(value = "match_id", type = IdType.AUTO)
    private Long matchId;

    /**
     * 赛事名称
     */
    @TableField(value = "match_name")
    private String matchName;

    /**
     * 赛事场地id
     */
    @TableField(value = "match_field")
    private Long matchField;

    /**
     * 赛事举办人
     */
    @TableField(value = "match_owner")
    private Long matchOwner;

    /**
     * 赛事公告id
     */
    @TableField(value = "match_notice")
    private String matchNotice;

    /**
     * 赛事详情
     */
    @TableField(value = "match_detail")
    private String matchDetail;

    /**
     * 赛事开始时间
     */
    @TableField(value = "match_start")
    private LocalDateTime matchStart;

    /**
     * 赛事结束时间
     */
    @TableField(value = "match_end")
    private LocalDateTime matchEnd;

    /**
     * 赛事创建时间
     */
    @TableField(value = "match_createtime")
    private LocalDateTime matchCreatetime;

    /**
     * 赛事更新时间
     */
    @TableField(value = "match_updatetime")
    private LocalDateTime matchUpdatetime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Matchs other = (Matchs) that;
        return (this.getMatchId() == null ? other.getMatchId() == null : this.getMatchId().equals(other.getMatchId()))
            && (this.getMatchName() == null ? other.getMatchName() == null : this.getMatchName().equals(other.getMatchName()))
            && (this.getMatchField() == null ? other.getMatchField() == null : this.getMatchField().equals(other.getMatchField()))
            && (this.getMatchOwner() == null ? other.getMatchOwner() == null : this.getMatchOwner().equals(other.getMatchOwner()))
            && (this.getMatchNotice() == null ? other.getMatchNotice() == null : this.getMatchNotice().equals(other.getMatchNotice()))
            && (this.getMatchDetail() == null ? other.getMatchDetail() == null : this.getMatchDetail().equals(other.getMatchDetail()))
            && (this.getMatchStart() == null ? other.getMatchStart() == null : this.getMatchStart().equals(other.getMatchStart()))
            && (this.getMatchEnd() == null ? other.getMatchEnd() == null : this.getMatchEnd().equals(other.getMatchEnd()))
            && (this.getMatchCreatetime() == null ? other.getMatchCreatetime() == null : this.getMatchCreatetime().equals(other.getMatchCreatetime()))
            && (this.getMatchUpdatetime() == null ? other.getMatchUpdatetime() == null : this.getMatchUpdatetime().equals(other.getMatchUpdatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMatchId() == null) ? 0 : getMatchId().hashCode());
        result = prime * result + ((getMatchName() == null) ? 0 : getMatchName().hashCode());
        result = prime * result + ((getMatchField() == null) ? 0 : getMatchField().hashCode());
        result = prime * result + ((getMatchOwner() == null) ? 0 : getMatchOwner().hashCode());
        result = prime * result + ((getMatchNotice() == null) ? 0 : getMatchNotice().hashCode());
        result = prime * result + ((getMatchDetail() == null) ? 0 : getMatchDetail().hashCode());
        result = prime * result + ((getMatchStart() == null) ? 0 : getMatchStart().hashCode());
        result = prime * result + ((getMatchEnd() == null) ? 0 : getMatchEnd().hashCode());
        result = prime * result + ((getMatchCreatetime() == null) ? 0 : getMatchCreatetime().hashCode());
        result = prime * result + ((getMatchUpdatetime() == null) ? 0 : getMatchUpdatetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", matchId=").append(matchId);
        sb.append(", matchName=").append(matchName);
        sb.append(", matchField=").append(matchField);
        sb.append(", matchOwner=").append(matchOwner);
        sb.append(", matchNotice=").append(matchNotice);
        sb.append(", matchDetail=").append(matchDetail);
        sb.append(", matchStart=").append(matchStart);
        sb.append(", matchEnd=").append(matchEnd);
        sb.append(", matchCreatetime=").append(matchCreatetime);
        sb.append(", matchUpdatetime=").append(matchUpdatetime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}